/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class IMUGyroscope {
    static categoryCode = '010080046';

    static categoryName = '陀螺仪';

    device = {};

    opts = {};

    _to = undefined;

    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device;
        this.opts = opts;
        this._to = to;
    }

    get categoryCode() {
        return IMUGyroscope.categoryCode;
    }

    get categoryName() {
        return IMUGyroscope.categoryName;
    }

    getSwitch(params) {
        return command({
            method: 'getSwitch',
            methodId: 'pUPQZjtI',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getXAxisAngularDisplacement(params) {
        return command({
            method: 'getXAxisAngularDisplacement',
            methodId: 'pDrhMbLM',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getXAxisAngularVelocity(params) {
        return command({
            method: 'getXAxisAngularVelocity',
            methodId: 'pZguAyBE',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getYAxisAngularDisplacement(params) {
        return command({
            method: 'getYAxisAngularDisplacement',
            methodId: 'pgh0sqUK',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getYAxisAngularVelocity(params) {
        return command({
            method: 'getYAxisAngularVelocity',
            methodId: 'pGoxwG49',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getZAxisAngularDisplacement(params) {
        return command({
            method: 'getZAxisAngularDisplacement',
            methodId: 'phEqckKl',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getZAxisAngularVelocity(params) {
        return command({
            method: 'getZAxisAngularVelocity',
            methodId: 'p1vZ5x8n',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setGyroCalibration(params) {
        return command({
            method: 'setGyroCalibration',
            methodId: 'peH32f2W',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setSwitch(params) {
        return command({
            method: 'setSwitch',
            methodId: 'ppAXNOiz',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default IMUGyroscope;
